package com.cj.mobile.iabp.mvp.contract;

import com.cj.mobile.iabp.mvp.model.entity.RemoveInfo;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;

import java.util.List;

import io.reactivex.Observable;

/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 2025/09/29 16:25
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
public interface AddRemoveInfoContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {

        void showRemoveInfo(String code, String name, RemoveInfo info);

        void loadRunTime(String runTime);

        void showLoadingSubmit();

        void hideLoadingSubmit();
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        // 通过计算获取撤机运行时间
        Observable<String> getRunTime(String patienId, String time);

        // 上传图片
        Observable<List<String>> upload(List<String> files);

        /**
         * 添加撤机信息
         *
         * @param pre         暂存0或提交1
         * @param patienId    患者id
         * @param doctorId    医生id
         * @param deptId      科室id
         * @param deptSec     院区id
         * @param regCode     注册代码
         * @param patientName 患者姓名
         * @param removeType  撤机类型
         * @param removeTime  撤机时间
         * @param runTimeStr  运行时间
         * @param focuse      关注
         * @param isAlive     撤机患者状态
         * @param moreDiag    并发症
         * @param moreDiagTxt 并发症中其它选项的文字描述
         * @param images      撤机情况拍照
         */
        Observable<Integer> addRemove(String pre, String patienId, String doctorId, String deptId, String deptSec,
                                      String regCode, String patientName, String removeType, String removeTime, String runTimeStr,
                                      String focuse, String isAlive, String moreDiag, String moreDiagTxt, List<String> images);

        Observable<Integer> updateRemove(String pre, String id, String patienId, String doctorId, String deptId, String deptSec,
                                         String regCode, String patientName, String removeType, String removeTime, String runTimeStr,
                                         String focuse, String isAlive, String moreDiag, String moreDiagTxt, List<String> images);
    }
}